import http from "../utils/request";

const api = {
    recommend: '/api/product/getRecommend',
    search: '/api/product/search',
    detail: '/api/product/detail'
}

export async function getRecommend(param: { pageNum: number, pageSize: number }) {
    return http.postJson(api.recommend, param);
}

export async function getSearch(param: { pageNum: number, pageSize: number }) {
    return http.postJson(api.search, param);
}

export async function getDataList(url: string, param: object | string) {
    return http.postJson(url, param);
}
export async function getDetail(param: object | string) {
    return http.postJson(api.detail, param);
}